import { queryUrlParams } from '@/utils/index'
import request from '@/utils/request'

export function initData(url, params, method) {
  return request({
    url: url + '?' + queryUrlParams(params),
    method: method || 'get'
  })
}

export function download(url, params) {
  return request({
    url: url + '?' + queryUrlParams(params),
    method: 'get',
    responseType: 'blob'
  })
}
